About Global Documents
Global Documents provides you with documents from around the globe on a variety of topics for your enjoyment.
Global Documents utilizes edocr for all its document needs due to edocr's wonderful content features. Thousands of professionals and businesses around the globe publish marketing, sales, operations, customer service and financial documents making it easier for prospects and customers to find content.
Tag Cloud
Page 1 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
osCommerce 2.2 Milestone 2
Update 051112
Documentation
Introduction......................................................................................................................... 4
Installation....................................................................................................................... 5
New Installation .......................................................................................................... 5
Installation Troubleshooting ......................................................................................... 10
Administration Guide.................................................................................................... 11
Admin : Configuration.................................................................................................. 12
My Store.................................................................................................................... 12
Minimum Values ...................................................................................................... 13
Maximum Values...................................................................................................... 13
Images ....................................................................................................................... 14
Customer Details....................................................................................................... 14
Shipping/Packaging .................................................................................................. 14
Product Listing.......................................................................................................... 14
Stock ......................................................................................................................... 15
Cache......................................................................................................................... 15
Email Options ........................................................................................................... 16
Download.................................................................................................................. 16
GZIP.......................................................................................................................... 17
Sessions..................................................................................................................... 17
Admin : Catalog............................................................................................................ 18
Categories/Products .................................................................................................. 18
Product Attributes ..................................................................................................... 19
Manufacturers ........................................................................................................... 20
Reviews..................................................................................................................... 20
Specials ..................................................................................................................... 20
Products Expected..................................................................................................... 20
Admin : Modules .......................................................................................................... 21
Admin : Customers ....................................................................................................... 22
Admin : Taxes............................................................................................................... 23
Admin : Localization .................................................................................................... 24
Admin : Reports............................................................................................................ 25
Admin : Tools ............................................................................................................... 26
Banner Manager........................................................................................................ 26
Database Backup....................................................................................................... 26
Send Email ................................................................................................................ 26
Newsletter Manager .................................................................................................. 26
Server Info ................................................................................................................ 27
Who's Online............................................................................................................. 27
Catalog .......................................................................................................................... 28
Page 2 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Catalog : Boxes ............................................................................................................. 29
Add/Remove Boxes .................................................................................................. 29
Add Images to Box Headings ................................................................................... 31
Add Box Pages.......................................................................................................... 33
Change Box Column Widths .................................................................................... 35
Change Box Corner Graphics ................................................................................... 36
Add Box Header Image ............................................................................................ 38
Add Link in Boxes to Site Outside osCommerce ..................................................... 41
Change Box Manufacturer Style............................................................................... 42
Limit New Products .................................................................................................. 44
Remove Entire Columns ........................................................................................... 45
Change Box Search Style.......................................................................................... 46
Catalog : Design............................................................................................................ 47
Add Background Color ............................................................................................. 47
Change >> In Header Navigation ............................................................................. 47
osCommerce Logo Change....................................................................................... 47
Remove Large Picture "clicks to enlarge" ................................................................ 48
Change Column Numbers in New Product Listing .................................................. 49
Stylesheet .................................................................................................................. 50
Setting the Table Width ............................................................................................ 56
Language Text Definitions ....................................................................................... 56
Catalog : Email ............................................................................................................. 60
Purchase Email Edits ................................................................................................ 60
Tell-A-Friend Form Email Edits............................................................................... 61
Welcome Email Edits ............................................................................................... 62
Catalog : Flash Banners ................................................................................................ 63
Catalog : Forms............................................................................................................. 65
Account Fields Edits ................................................................................................. 65
Add Search Descriptions to Forms ........................................................................... 65
Catalog : Images ........................................................................................................... 67
Add Image to Also Purchased................................................................................... 67
Add Catalog Image to Category Listings.................................................................. 67
Add Image to Columns ............................................................................................. 68
Catalog : Links.............................................................................................................. 69
Links in Boxes .......................................................................................................... 69
Logo to Another Site................................................................................................. 69
Logo to Site Page ...................................................................................................... 70
Catalog : Prices ............................................................................................................. 71
Disable Prices............................................................................................................ 71
Remove Catalog Prices ............................................................................................. 72
Catalog : Ship................................................................................................................ 73
Local Shipping Rate.................................................................................................. 73
Change UPS Listings ................................................................................................ 73
Errors............................................................................................................................. 75
MYI 1016.................................................................................................................. 75
Fatal Class................................................................................................................. 76
Page 3 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Failed Opening.......................................................................................................... 76
Cannot Add Header Information .............................................................................. 76
Internal Server........................................................................................................... 76
Miss Argument.......................................................................................................... 77
Mysql Too Many Connections.................................................................................. 77
Mysql Access Denied for User ................................................................................. 78
MYI 1016.................................................................................................................. 78
Set Time .................................................................................................................... 78
SSL - This page contains secure and non secure items ............................................ 79
Write to Config ......................................................................................................... 85
Sessions......................................................................................................................... 86
Tips ............................................................................................................................... 87
Add Back Button to product_info............................................................................. 87
Add Cart to Each Page.............................................................................................. 87
Add Horizontal Rule (hr) .......................................................................................... 88
Add Master Password ............................................................................................... 89
Add New Class ......................................................................................................... 89
Add php Links to Graphics to hold Session ID ........................................................ 90
Add Quantity Box ..................................................................................................... 93
Add References to Advanced Search........................................................................ 93
Add Right Column Define........................................................................................ 94
Add Calendar To Advanced Search.......................................................................... 94
Add the Search Form To Other Pages ...................................................................... 96
Add Text to the Model Number................................................................................ 97
Add Visitors IP ......................................................................................................... 97
Add Width to Product Listings Column ................................................................... 98
Change "click to enlarge" Text as a Graphic ............................................................ 99
Change The Number Of New Product Colums ...................................................... 100
Change Product Model Length ............................................................................... 100
Disable Payment Modules For Orders Over Certain Amount ................................ 101
Display Category Name.......................................................................................... 101
Move Country to Top of DropBox ......................................................................... 104
Move the Tell-A-Friend Form ................................................................................ 104
Password Text Characters....................................................................................... 105
Remove Category Arrows....................................................................................... 105
Remove What's New Box ....................................................................................... 106
Reset The Order ID Value ...................................................................................... 106
Search Engine Optimization ................................................................................... 107
SSL Hiding Infoboxes............................................................................................. 110
Upload Images to Their Own Folder in the Admin ................................................ 110
Use .htaccess File.................................................................................................... 111
Weight as Whole Number....................................................................................... 114
Page 4 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Introduction
This documentation is a starting point for those new to osCommerce, PHP, and MySQL.
The documentation will help you install osCommerce and implement some basic
customizations of your store. These documents are for version 2.2 Milestone 2 Update
051112.
This is not an exhaustive study of osCommerce but a basic introductory help guide. The
installation, catalog changes, and administration tool changes were written from people
helping people. We have also included some errors, fixes, and general information about
sessions. All of this information was compiled from the osCommerce community support
forum and put together into an organized and easy to read format to help with the basic
questions.
Our sincere and grateful thanks to all those on the forum who have helped others with
their expertise in answering questions.
Have a wonderful beginning!
Page 5 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Installation
osCommerce's feature packed out-of-the-box installation allows store owners to setup,
run, and maintain their online stores with minimum effort and with no costs involved.
osCommerce combines open source solutions to provide a free and open development
platform, which includes the powerful PHP web scripting language, the stable Apache
web server, and the fast MySQL database server.
With no restrictions or special requirements, osCommerce can be installed on any PHP3
or PHP4 enabled web server, on any environment that PHP and MySQL supports, which
includes Linux, Solaris, BSD, and Microsoft Windows environments.
New Installation
Upload the catalog directory to your server using FTP.
All PHP files must be uploaded in ASCII mode, not binary mode.
The structure of osCommerce is:
catalog
catalog/admin
extras
Upload the catalog folder which includes the admin folder to your document root
(public_html, www, htdocs) using FTP.
Using phpMyAdmin or another tool, create your database and user, and assign that user
to the database. Write down the name of the database, username, and password for this
database for the database installation procedure.
Open your web browser and go to http://yourserver/catalog/install/ and click on the
Install button.
The following instructions will guide you to configuring the online store for your server.
Step 1
Please customize your new installation with the following options:
Page 6 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Import Catalog Database - Install the database and add the sample data - leave this box
checked
Checking this box will import the database structure, required data, and some sample
data. (required for first time installations)
Automatic Configuration - Save configuration values - leave this box checked
Checking this box will save all entered data during the installation procedure to the
appropriate configuration files on the server.
Click the "Continue" button.
Step 2
Please enter the database server information:
Database Server – localhost
The database server can be in the form of a hostname, such as db1.myserver.com, or as
an IP-address, such as 192.168.0.1.
Username – username
The username used to connect to the database server. An example username is
'mysql_10'.
Note: Create and Drop permissions are required at this point of the installation
procedure. This first user should have CREATE privileges on the database
Password – password
The password is used together with the username, which forms the database user account.
Database Name – database name
The database used to hold the data. An example database name is 'osCommerce'.
Persistent Connections:
Enable persistent database connections.
Note: Persistent connections should be disabled for shared servers.
Session Storage:
Files
Database (choose Database)
Page 7 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Store user session data as files on the server, or in the database.
Note: Due to security related issues, database session storage is recommended for
shared servers.
Click the "Continue" button.
Step 3
Database Import
A test connection made to the database was successful.
Please continue the installation process to execute the database import procedure.
It is important this procedure is not interrupted, otherwise the database may end up
corrupt.
The file to import must be located and named at:
/home/username/public_html/catalog/install/oscommerce.sql
Click the "Continue" button.
Database Import
The database import was successful!
Click the "Continue" button.
Step 4
Please enter the web server information:
WWW Address - http://www.your-server.com/catalog/
The full website address to the online store
Webserver Root Directory - /home/username/public_html/catalog/
The server path to the online store
HTTP Cookie Domain - .your-server.com
The domain to store cookies in
HTTP Cookie Path - /catalog/
Page 8 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
The path to store cookies under
Enable SSL Connections - if you have ssl enable this
Enable secure SSL/HTTPS connections (requires a secure certificate installed on the web
server)
Click the "Continue" button.
Step 5
Note: This second user only needs SELECT, UPDATE and INSERT privileges if
you are using a second user. Most of times, both mysql users will be the same, but it
leaves the door open for added security if wanted.
Database Server - localhost
The database server can be in the form of a hostname, such as db1.myserver.com, or as
an IP address, such as 192.168.0.1
Username – username
The username is used to connect to the database server. An example username is
mysql_10.
Note: If the catalog is to be imported (selected above), the account used to connect to
the database server needs to have Create and Drop permissions.
Password – password
The password is used together with the username, which forms the database user account
Database Name – database name
The database used to hold the catalog data. An example database name is catalog
Persistent Connections:
Enable persistent database connections.
Note: Persistent connections should be disabled for shared servers.
Session Storage:
Files
Database (choose Database)
Page 9 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Store user session data as files on the server, or in the database.
Note: Due to security related issues, database session storage is recommended for
shared servers.
Click the "Continue" button.
You are nearly finished!
Rename the catalog/install folder or delete it.
Reset the permissions on /catalog/includes/configure.php to 644 (if you are still getting
the warning message at the top set configure.php to 444 which is read only - this happens
on some servers that have been updated for security reasons).
Set the permissions on /catalog/images directory to 777.
Reset the permissions on /catalog/admin/includes/configure.php to 644.
Create the dir /catalog/admin/backups and set the permissions to 777.
Set the permissions on /catalog/admin/images/graphs directory to 777.
You need to .htaccess your /catalog/admin directory so that it is password protected. You
can use the password manager in your server admin area like cpanel.
Congratulations! Now you are really done!
Page 10 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Installation Troubleshooting
Stylesheet: All images are broken
If a page shows everything right except the graphics and formatting are missing then go
to that page and change the link of your stylesheet in whatever file is not displaying
correctly:
rel=stylesheet>
All you have to do is find that line in and correct the path to point to your actual
stylesheet.css.
Page 11 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Administration Guide
This is the beginning of how to understand the osCommerce administration. This will be
a work in progress.
After you have logged into your store admin you will see a box of heading links on the
left for each section that needs to be modified. The information for each link is listed in
the center to the right.
We will go through each link in each section. The section headings are the pages of the
admin help documents and each page under the section heading is the linked page with
the information for that link only.
Page 12 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Configuration
The Configuration section will setup all the basic store configuration.
Click on "Configuration" and a drop down of text links will appear.
Click on one of the drop downs and to the right you will see the listings. To edit any of
these listings click in the space of each listing and when that listing is highlighted, click
on the "edit" button on the right.
My Store
Store Name
Name of your store
Store Owner
Can be your name or the name of your store. This will show up in the email in the "from"
when the customer receives their purchase email.
E-Mail Address
The "from" email address in the customer's purchase email.
E-Mail From
Your store general email.
Country
Country you are from.
Zone
The state or zone your store is located in. This is necessary to setup for taxes later on.
Expected Sort Order
The sort order used in the expected products box.
Expected Sort Field
The column to sort by in the expected products box
Switch To Default Language Currency
If you have several currencies it will automatically switch currencies when the language
is changed.
Page 13 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Send Extra Order Emails To
Your email address where you will receive orders.
Use Search-Engine Safe URLs
Display Cart After Adding Product
If set to "true" will show the shopping cart page when a product is put in the cart and then
the customer has to click on "continue" to go back to their product page to continue
shopping. They will also see their items in the shopping cart box.
If this is set to "false" then the customer will stay on the same page of the item they are
putting in the cart and will be able to see their items in the shopping cart box on the top
right column (if you move this, then wherever this box is).
Allow Guest To Tell A Friend
Lets the customer, when shopping, tell a friend about your site through the tell-a-friend
box.
Default Search Operator
Gives you "and' or "or" to use to search with.
Store Address and Phone
The name of your store, phone, and other information that will be seen if the customer is
using check/money order to checkout with.
Show Category Counts
Set to "true" to show the counts of products in each category.
Set to "false" if you do not want to show the number of products in each category.
Tax Decimal Places
Pads the tax value with decimal places.
Display Prices with Tax
Set to "false" and prices will not display with tax.
Set to "true" and prices will display with tax.
Minimum Values
These are the minimum values of any field filled out by the customer. Usually these are
left as is.
Maximum Values
Page 14 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
These are the maximum values of fields of different modules in your store.
Most of these are self-explanatory. These are just a couple that sometimes confuse
people.
Page Links is how many page numbers you see at the bottom of your product listing.
The "Search Results" listing is how many products will be listed in your store on one
page.
Images
These are the settings for all your images in the store. You can edit them to whatever you
need.
The "Small Image Width & Height" are the image sizes of your products in the product
listing page.
The "Heading Image Width & Height" are the image sizes that are uploaded for each
category.
The "Subcategory Image Width & Height" are all the sub-category image sizes.
Customer Details
These are the values that a customer fills out when they register at your store.
Enable or Disable these as you see fit.
Shipping/Packaging
Country Of Origin - set your country
Postal Code - set your postal code
Enter the Max Package Weight - Put your maximum weight here (this will be used if you
choose "ship by weight" in the Modules/Shipping Table Rate line.
Product Listing
Page 15 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
This displays the order of your products listed in your store. Change the values for
whatever product order you want.
Location of Prev/Next Navigation Bar sets the locatin of the Prev?Next Navigation Bar,
either top, bottom, or both.
Stock
This is an inventory control.
Set Stock level, Subtract Stock to true and osc will check your stock and substract stock
from items purchased.
Allow checkout allows customer to checkout even though your stock level is too low.
Mark product out of stock is a symbol you can use to mark a product that is out of stock.
Stock Re-order level is the set level that your stock gets down to before re-ordering.
Cache
Whenever your cache directory is not setup for your store you will get a pink error
message at the top of the store screen like this:
Error: Cache directory does not exist. Please set this Configuration->Cache.
In the admin under Tools/Cache Control the listings are as follows:
Categories Box File does not exist
Manufacturers Box File does not exist
Also Purchased Module File does not exist
Cache Directory: /tmp/
Through an FTP program, create a subfolder named "cache" in the "catalog" folder and
set the chmod permissions to 777. Then go to Configuration/Cache. Click on "Use
Cache" and set to "true". Click on Cache Directory
and set the absolute directory path to the "cache" folder.
If there is any question or problem establishing the absolute path, it may be because of
server redirects. Go to Tools/Database Backup and see what path is listed by the Admin
Page 16 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
for the database 'backups' folder. Use that path and append 'catalog/cache/' to the end of it
so that your path might appear as:
/home/username/www/catalog/cache/
Pay close attention to case sensitivity so that the directory path exactly matches the
"cache" folder created in FTP. Go back to Tools/Cache Control, refresh if necessary, and
the error message should be gone.
If the "file does not exist" messages still exist, upload via FTP, three blank files into your
cache directory called:
categories_box-english.cache
manufacturers_box-english.cache
also_purchased-english.cache
If there are more languages, create more files replacing engish with language name and
upload.
Now, go back to Tools/Cache Control, refresh if necessary, and the files should be
established, listing the date and time they were created.
Email Options
To be done.
Download
You need to enable this if you are going to allow people to download products at
checkout from your store.
First, put the product to be downloaded in the download folder on the Internet:
catalog/download
It will be read from the "pub" folder.
Make sure /catalog/pub is 777 and /catalog/download is 755 and these files in
catalog/includes/configure.php have the forward slash:
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
Page 17 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Under configuration in the admin set up the download info, true, true, expiry date, max
number of downloads.
Add the product in the admin under "catalog", "categories/products.
After you have added the product go to "Product Attributes" under the "Catalog" heading
in admin.
Choose the product in the bottom "Product Attributes" box.
When you choose a product and have download enabled in the configuration section you
will see a box below the "Product Attributes" section where you can add the product as a
download.
GZIP
This helps in your download of your store. Normal setting is 5 but if you have a lot of
traffic set to 9.
Sessions
You can set your configure.php file to store sessions in the database or you can set a
"sessions directory" if you are storing files in files.
Customers on AOL cannot use your store with these all set to "True". The only two that
can be set to "True" for aol users are "Force Cookie Use" and "Prevent Spider Sessions".
Page 18 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Catalog
The Catalog section will input all your products and category folders including setting up
your products as an expected date, setup product attributes, manufacturers, check your
reviews, & put products on special.
Categories/Products
Categories/Products
Clicking on the "new category" button in the center section will make a new folder.
Clicking on the "new product" button will make a new product.
When you are making a new product you have the ability to:
show the product in or out of stock
set the date the product will be availabe which corresponds with the "Products Expected"
module
set the product's manufacturer
set the product's name and description
set the product's quantity in stock (this corresponds with the "Configuration" "Stock"
section, product's model number
upload the products's image
set a product's url if you need to link out to another site
set the product's price
set the tax class which is used to charge tax on each product (this class must be setup first
in the tax section)
set products weight which, if you are using "weight" for your shipping schedule, each
product will need to have a weight listed
Top
After you have made a new folder or product it will show up on this main screen which is
called **"Top"** which is the name in the drop-down box at the upper right. This drop-
down box will eventually list all the folders and products in your store.
Move a Category Folder
To move a category folder, click to highlight that folder and choose the **"move"**
button on the right. You can move folders to other folders or to the **"Top"** directory.
Page 19 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Move a New Product
To move a new product, click to highlight the product you want to move and click the
**"move"** button on the right. When you click the **"move"** button you will see this
message:
"Move (name of product) to:".
Choose a place to move it and click the **"move"** button.
Copy a New Product
To copy a new product, click to highlight the product you want to copy and click the
**"copy to"** button on the right. When you click the **"copy to"** button you will see
this message:
Copy Method:
-Link product
-Duplicate product
Choose "Link product" if you just want to link it and "Duplicate product" if you want to
add another product.
Product Attributes
This section deals with the attributes of your products. For example, you sell shirts of
different sizes and different colors.
First, you would seup the "Option Name" (under "Product Options" at the top left). Using
shirts as an example you would have at least 2 "Option Names", color and size.
Next, you will setup your "Option Values" (under "Option Values" at the top right).
In this section you will see a box that shows the "Option Names" that you have already
setup. You have color setup as an "Option Name" so make sure color is in this box. Then,
to the right of that box is a blank box where you type in one of your colors. Do this for
each color and then do this again for each size. Make sure you associate and "Option
Value" (red, white, blue) with an "Option Name" (color, size, etc.).
Now, you are ready to start adding options to your products.
Under the "Products Attributes" section at the bottom you will see a drop down box
listing all of your products that you have already put into your store. Choose one and
follow across the drop downs to the right. The next box is the "Option Names", then the
"Option Values", and then the price box. If the price stays the same on each attribute then
leave this box blank. If the price goes up or down on each attribute then put an amount
from the "base price" and put a "plus" or "minus" sign in the next box.
For Example:
Page 20 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
size = medium = 10.00 (this is the regular price so no need to put a price in the "price
box".
size = small = 8.00 (put 2.00 - (this is $2 with a "minus" sign from the base price of
$10.00)
size = large = 12.00 (put 2.00 + (this is $2 with a "plus" sign from the base price of
$10.00)
Manufacturers
Add a manufacturer with their own image by clicking the "insert" button link. A
Manufacturers' URL can also be listing to direct link to the manufacturer.
Reviews
A listing of reviews that customers have put in is in this section. These reviews can be
edited or deleted by the store administrator.
Specials
Products can be listed as a special discount by a percentage or by an amount.
Click the "new product" graphic.
On the next screen choose your product from the drop-down box, put a special price. This
can be a percentage (10%) off or it can be a reduced set dollar amount like 10.00, and the
expiration date if any.
You can enter a percentage to deduct in the Specials Price field, for example: 20%
If you enter a new price, the decimal separator must be a '.' (decimal-point), example:
49.99
Leave the expiry date empty for no expiration
Products Expected
This is the list of products that will be expected to be in your store on a certain date. This
is setup when you input a product into the "Categories/Products" section.
Page 21 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Modules
The modules section is where you will setup your payment, shipping, and order total
ordering.
Payment
You will see several different payment modules. To turn one on click the "green dot" to
the right of the name. The "red dot" turns them off. You will have to enable one before
you can edit it.
After one is enabled by clicking the "green dot" that line will be highlighted. To edit,
click the edit button to the right of the highlighted line and edit.
Shipping
In shipping you have several different ways to charge shipping. To turn one on click the
"green dot" to the right of the name. The "red dot" turns them off. You will have to
enable one before you can edit it.
After one is enabled by clicking the "green dot" that line will be highlighted. To edit,
click the edit button to the right of the highlighted line and edit.
Order Total
The "Order Total" module puts the items in the order they will appear in the checkout
process. If you have inadvertantly put the same "sort order" on 2 items only one will
show up.
Page 22 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Customers
Customers
This is a list of all your customers that you can edit all but the password field and/or
delete customers. The password field does not show up.
Each individual customer can be emailed from this section.
Orders
These are your "pending" orders. Click the "edit" button to see the order and you can
change the status of the order, put comments in the comments box, and notify the
customer of the progress of their order.
You also have an invoice and packing slip capability. You can change the
oscommerce.gif graphic on the invoice and packing slip by changing it in
admin/images/oscommerce.gif to show your store image.
Page 23 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Taxes
This section sets up your taxes and zone for your store.
Countries
A listing of all countries in your store.
Zones
A listing of all zones in your store.
Tax Zones
The state and tax description of your store.
Tax Classes
The title of your tax class title like "taxable goods" and the description of that title.
Tax Rates
The tax rate of the state your store is in.
How to Setup Your Taxes
In admin, under Locations/Taxes, click on "Tax Zones"
Click on the "new zone" button. In the Zone Name: input field I enter "CA"
For Description I enter "California". Click on "insert"
After you click insert, you will see CA show up in the list. You think you're done, but not
quite!
Click on the "CA" (or whatever name you have!) in the list and you will see the heading
say "Geographical Zones / CA"
Here you see a "new zone" button again. Click on it!
Now you get to select a geographical zone. From Country, I Select United States
From Region, Select California. Click "update"
A few more steps to go! Now under "Locations/Taxes" click on "Tax Rates"
Click on "new tax rate" button
Select "Taxable Goods" from the Tax Class Title drop down menu
From the Zone menu, select CA (or whatever zone you created)
In the Tax Rate field enter the tax percentage
In the Description, enter the description, e.g. "California Sales Tax"
Now you're done!
Page 24 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Localization
This sets up your default currency, language, and order status to notify your customers.
The Orders Status can added to or the name changed by clicking the "edit" button after
that line has been clicked and is highlighted.
Page 25 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Reports
This section shows how many products have been viewed, purchased, and the total of
customers orders.
Page 26 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Tools
The Tools section is used to backup your database, manage a banner, file manager, send
your customers an email, send your customers a newsletter, give you your server
information, and see who's online.
Banner Manager
The banner manager allows you to put a banner at the bottom of your pages and to have
banner stats.
When the banner is turned on you will have the stats.
Database Backup
Click on the "backup" button.
Choose GZIP, ZIP, or pure sql.
Click "Download only" to download to your harddrive. A box will pop up for you to pick
the folder to put it in.
If you do not choose backup only then the backup manager will back it up to the backups
folder you have setup under the admin folder. The permissions on this backups folder
must be 777 to allow backups to be stored here. The backups folder will be secured by
the admin login as long as it is under the admin folder and the admin is password
protected by your server.
Send Email
You can send an email to one customer, to all customers, or to all newsletter subscribers.
Select the customer or customers in the drop down box.
Type a subject for your email.
Type a message for your email.
Click "send mail" button.
The next screen comes up showing your message and allows you to make changes before
really submitting. If all is good click the "send mail" button and your email will be sent.
Newsletter Manager
Page 27 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Click on "new newsletter" to make a new newsletter.
Choose Newsletter in the drop down box to send a regular newsletter.
Choose product_notification in the drop down box to notify customers of products.
Choose a title and type your message in the content box.
Click save.
This will take you back to the original page with your newsletter listed.
Click the "lock" button on the right.
Now, you can edit, delete, preview, send, or unlock your new newsletter.
For the product_notification newsletter click send.
On the next page choose the products on the left and transfer them to the right box.
Click submit.
Any customer who has asked to be notified on all products or certain products will be
sent an email.
Server Info
Information about your server you are hosting on. This is useful if you need to know
exactly what programs are on your server.
Who's Online
A traffic reporting tool useful to see who is accessing your site. If a customer is logged
into your store and looking around you can click on their link and see what page they are
on and what products they are looking at.
Page 28 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Catalog
The catalog section is divided into categories and sub-categories to make it easier to find
different areas.
Page 29 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Catalog : Boxes
Add/Remove Boxes
New boxes can be easily added to the left or right side column by editing the appropriate
includes/column_left.php or includes/column_right.php file.
Add Boxes
New boxes should be based on already existing boxes to make sure the formatting of the
page does not get broken.
It is important to make sure that new boxes are wrapped within and
tags:
##BOX CONTENT HERE##
For this example, the new box will be based on the Information box:
$info_box_contents = array();
$info_box_contents [] = array('text' => BOX_HEADING_INFORMATION );
new infoBoxHeading ($info_box_contents , false, false);
$info_box_contents = array();
$info_box_contents [] = array('text' => '' .
BOX_INFORMATION_SHIPPING . '
' .
'' .
BOX_INFORMATION_PRIVACY . '
' .
'' .
BOX_INFORMATION_CONDITIONS . '
' .
'' .
BOX_INFORMATION_CONTACT . '
' .
'' .
BOX_INFORMATION_SITEMAP . '');
new infoBox ($info_box_contents );
?>
Page 30 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
The includes/boxes/information.php file above will be copied to
includes/boxes/my_new_box.php and will contain the following with MY_NEW_BOX
text changing to the name of your box file and PAGE listings renamed to the new pages
that will go in this new box:
$info_box_contents = array();
$info_box_contents [] = array('text' => BOX_HEADING_MY_NEW_BOX );
new infoBoxHeading ($info_box_contents , false, false);
$info_box_contents = array();
$info_box_contents [] = array('text' => '' .
BOX_MY_NEW_BOX_PAGE1 . '
' .
'' .
BOX_MY_NEW_BOX_PAGE2 . '
' .
'' .
BOX_MY_NEW_BOX_PAGE3 . '
' .
'' .
BOX_MY_NEW_BOX_PAGE4 . '
' .
'' .
BOX_MY_NEW_BOX_PAGE5 . '');
new infoBox ($info_box_contents );
?>
The new box must then be included from either the includes/column_left.php or
includes/column_right.php left or right side column file.
For this example, the new box will be included before the Information box on the left
side column in includes/column_left.php :
require( DIR_WS_BOXES . 'categories.php');
require(DIR_WS_BOXES . 'manufacturers.php' );
require(DIR_WS_BOXES . 'whats_new.php' );
require(DIR_WS_BOXES . 'search.php' );
require(DIR_WS_BOXES . 'my_new_box.php' );
require(DIR_WS_BOXES . 'information.php' );
?>
Next the new title and pages that go in the newly made box must be changed.
Page 31 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
In catalog/includes/languages/english.php find this code:
// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Terms & Conditions');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');
define('BOX_INFORMATION_SITEMAP', 'Sitemap');
Copy this information for the Information Box and paste below the Information Box
listing in the catalog/includes/languages/english.php file like this changing the Heading
Title for the new box plus adding additional pages to the new box:
// my new box text in includes/boxes/my_new_box.php
define('BOX_HEADING_MY_NEW_BOX', 'My New Box');
define('BOX_MY_NEW_BOX_PAGE1', 'Page1');
define('BOX_MY_NEW_BOX_PAGE2', 'New Page2');
define('BOX_MY_NEW_BOX_PAGE3', 'New Page3');
define('BOX_MY_NEW_BOX_PAGE4', 'New Page4');
define('BOX_MY_NEW_BOX_PAGE5', 'New Page5');
Please refer to Add Box Pages for adding these additional pages in the new box.
Remove Boxes
Boxes can be removed from the left or right hand column by editing the appropriate
includes/column_left.php or includes/column_right.php files.
Example includes/column_left.php file:
To remove the What's New box, it's inclusion needs to be commented out or removed
entirely:
require( DIR_WS_BOXES . 'categories.php');
require(DIR_WS_BOXES . 'manufacturers.php' );
require(DIR_WS_BOXES . 'whats_new.php' );
require(DIR_WS_BOXES . 'search.php' );
//require(DIR_WS_BOXES . 'my_new_box.php');
require( DIR_WS_BOXES . 'information.php');
?>
Add Images to Box Headings
Images can be added to each box displayed in the left and right side columns, where the
same image is used for all boxes or where different images are used for different boxes.
Page 32 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Solutions
Heading Text Replacement
Use Of Cascading Style Sheets
Heading Text Replacement
The simple method of having images in the box heading is to replace the heading text
value with an image.
This can be done by editing the main language file in the includes/languages/ directory,
for example includes/languages/english.php.
To replace the Categories box heading with an image, the heading title definition of
BOX_HEADING_CATEGORIES will need to be changed from:
define('BOX_HEADING_CATEGORIES', 'Categories');
To:
define('BOX_HEADING_CATEGORIES', '');
Use Of Cascading Style Sheets
The advanced method of having images in the box heading is to create CSS definitions
for each box where an image is to be shown.
The following example concentrates on the Categories box and needs the following three
files to be modified:
includes/classes/boxes.php
includes/boxes/categories.php
stylesheet.css
The following code should be added to includes/classes/boxes.php at the very bottom of
the page right before the ending ?> tag:
class infoBoxHeadingCategories extends tableBox {
function infoBoxHeadingCategories($contents) {
$this->table_cellpadding = '0';
$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'width="100%" class="infoBoxHeadingCategories"',
'text' => $contents[0]['text']));
$this->tableBox($info_box_contents, true);
}
}
Page 33 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
The code above creates a new class called infoBoxHeadingCategories which will be used
in the Categories box.
The following code in includes/boxes/categories.php:
new infoBoxHeading($info_box_contents, true, false);
should be replaced with:
new infoBoxHeadingCategories($info_box_contents, true, false);
As the new infoBoxHeadingCategories class uses a new stylesheet definition just for the
Categories box, the following needs to be added to the stylesheet.css file:
TD.infoBoxHeadingCategories {
background: #33c3d3;
background-image: url('images/some_graphic.gif');
background-repeat: no-repeat;
}
This new class in the stylesheet can have the font, size, spacing, etc. set according to css
styles.
Add Box Pages
Adding an additional box link page gives the store owner more flexibility for new pages
in their store under the different named boxes.
Add Box Pages
Adding a page or pages to one of the default boxes or a new box that you have made
allows you to add more information easily to your site. Our example box will be the
includes/boxes/information.php box.
Five files are necessary to change to add more pages to your box. These files can be
altered for an already displayed box or a new box.
Files to change are:
catalog/shipping.php
catalog/includes/filenames.php
catalog/includes/languages/english.php
catalog/includes/languages/english/shipping.php
catalog/includes/boxes/information.php
Page 34 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Open the catalog/shipping.php page in your favorite editor and save it as another name,
for instance, about_us.php.
In the new about_us.php file that you have just made change the following require and
$breadcrumb filenames to the ABOUT_US name of your new file.
/*
$Id: about_us.php,v 1.21 2003/02/13 04:23:23 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
require( 'includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUT_US );
$breadcrumb ->add(NAVBAR_TITLE, tep_href_link( FILENAME_ABOUT_US ));
Now it is time to define this new page called about_us.php so in
catalog/includes/filenames.php copy one of the defines, paste it underneath or at the
bottom of the file, and change the name to your new about_us.php file like this:
define('FILENAME_ABOUT_US', 'about_us.php');
The catalog/includes/languages/english.php file needs to have a listing of this file in
whichever box it will be called from in your store. It is defined in the information box for
an example.
// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');
define('BOX_INFORMATION_ABOUT_US', 'About Us');
Open the shipping.php page in catalog/includes/languages/english/ folder and other
languages folders and save as about_us.php like you did with the catalog/shipping.php
page above.
/*
$Id: about_us.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2002 osCommerce
Released under the GNU General Public License
*/
define('NAVBAR_TITLE', 'About Us');
define('HEADING_TITLE', 'About Us');
Page 35 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
define('TEXT_INFORMATION', 'YOUR ABOUT US TEXT GOES HERE' );
?>
The define for about_us.php will need to be added to the information.php page in
catalog/includes/boxes/information.php or to any new box file you have made.
'' .
BOX_INFORMATION_SHIPPING . '
' .
'' .
BOX_INFORMATION_PRIVACY . '
' .
'' .
BOX_INFORMATION_CONDITIONS . '
' .
'' .
BOX_INFORMATION_CONTACT . '
' .
'' .
BOX_INFORMATION_ABOUT_US . ''
);
You can change the order of any of these listings in the information.php file but be
careful that the last listing has the closing tag ''); and the listings above the last one
end with '
' .
Change Box Column Widths
/includes/application_top.php about line 58
// customization for the design layout
define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)
This changes both the right and left columns.
To keep the left column boxes 125 wide as above or whatever setting you want and
change the right column boxes or graphic or whatever you have in the right column do
this.
Make a new define in includes/application_top.php about line 58 called under the
BOX_WIDTH setting called BOX_WIDTH_RIGHT:
// customization for the design layout
define('BOX_WIDTH', 160); // how wide the boxes should be in pixels (default: 125)
define('BOX_WIDTH_RIGHT', 120); // how wide the right column should be in pixels
Change this code in each page in the catalog folder about line 334 for the right column
only.
From:
Page 36 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
width="" cellspacing="0" cellpadding="0">
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
osCommerce 2.2 Milestone 2
Update 051112
Documentation
Introduction......................................................................................................................... 4
Installation....................................................................................................................... 5
New Installation .......................................................................................................... 5
Installation Troubleshooting ......................................................................................... 10
Administration Guide.................................................................................................... 11
Admin : Configuration.................................................................................................. 12
My Store.................................................................................................................... 12
Minimum Values ...................................................................................................... 13
Maximum Values...................................................................................................... 13
Images ....................................................................................................................... 14
Customer Details....................................................................................................... 14
Shipping/Packaging .................................................................................................. 14
Product Listing.......................................................................................................... 14
Stock ......................................................................................................................... 15
Cache......................................................................................................................... 15
Email Options ........................................................................................................... 16
Download.................................................................................................................. 16
GZIP.......................................................................................................................... 17
Sessions..................................................................................................................... 17
Admin : Catalog............................................................................................................ 18
Categories/Products .................................................................................................. 18
Product Attributes ..................................................................................................... 19
Manufacturers ........................................................................................................... 20
Reviews..................................................................................................................... 20
Specials ..................................................................................................................... 20
Products Expected..................................................................................................... 20
Admin : Modules .......................................................................................................... 21
Admin : Customers ....................................................................................................... 22
Admin : Taxes............................................................................................................... 23
Admin : Localization .................................................................................................... 24
Admin : Reports............................................................................................................ 25
Admin : Tools ............................................................................................................... 26
Banner Manager........................................................................................................ 26
Database Backup....................................................................................................... 26
Send Email ................................................................................................................ 26
Newsletter Manager .................................................................................................. 26
Server Info ................................................................................................................ 27
Who's Online............................................................................................................. 27
Catalog .......................................................................................................................... 28
Page 2 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Catalog : Boxes ............................................................................................................. 29
Add/Remove Boxes .................................................................................................. 29
Add Images to Box Headings ................................................................................... 31
Add Box Pages.......................................................................................................... 33
Change Box Column Widths .................................................................................... 35
Change Box Corner Graphics ................................................................................... 36
Add Box Header Image ............................................................................................ 38
Add Link in Boxes to Site Outside osCommerce ..................................................... 41
Change Box Manufacturer Style............................................................................... 42
Limit New Products .................................................................................................. 44
Remove Entire Columns ........................................................................................... 45
Change Box Search Style.......................................................................................... 46
Catalog : Design............................................................................................................ 47
Add Background Color ............................................................................................. 47
Change >> In Header Navigation ............................................................................. 47
osCommerce Logo Change....................................................................................... 47
Remove Large Picture "clicks to enlarge" ................................................................ 48
Change Column Numbers in New Product Listing .................................................. 49
Stylesheet .................................................................................................................. 50
Setting the Table Width ............................................................................................ 56
Language Text Definitions ....................................................................................... 56
Catalog : Email ............................................................................................................. 60
Purchase Email Edits ................................................................................................ 60
Tell-A-Friend Form Email Edits............................................................................... 61
Welcome Email Edits ............................................................................................... 62
Catalog : Flash Banners ................................................................................................ 63
Catalog : Forms............................................................................................................. 65
Account Fields Edits ................................................................................................. 65
Add Search Descriptions to Forms ........................................................................... 65
Catalog : Images ........................................................................................................... 67
Add Image to Also Purchased................................................................................... 67
Add Catalog Image to Category Listings.................................................................. 67
Add Image to Columns ............................................................................................. 68
Catalog : Links.............................................................................................................. 69
Links in Boxes .......................................................................................................... 69
Logo to Another Site................................................................................................. 69
Logo to Site Page ...................................................................................................... 70
Catalog : Prices ............................................................................................................. 71
Disable Prices............................................................................................................ 71
Remove Catalog Prices ............................................................................................. 72
Catalog : Ship................................................................................................................ 73
Local Shipping Rate.................................................................................................. 73
Change UPS Listings ................................................................................................ 73
Errors............................................................................................................................. 75
MYI 1016.................................................................................................................. 75
Fatal Class................................................................................................................. 76
Page 3 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Failed Opening.......................................................................................................... 76
Cannot Add Header Information .............................................................................. 76
Internal Server........................................................................................................... 76
Miss Argument.......................................................................................................... 77
Mysql Too Many Connections.................................................................................. 77
Mysql Access Denied for User ................................................................................. 78
MYI 1016.................................................................................................................. 78
Set Time .................................................................................................................... 78
SSL - This page contains secure and non secure items ............................................ 79
Write to Config ......................................................................................................... 85
Sessions......................................................................................................................... 86
Tips ............................................................................................................................... 87
Add Back Button to product_info............................................................................. 87
Add Cart to Each Page.............................................................................................. 87
Add Horizontal Rule (hr) .......................................................................................... 88
Add Master Password ............................................................................................... 89
Add New Class ......................................................................................................... 89
Add php Links to Graphics to hold Session ID ........................................................ 90
Add Quantity Box ..................................................................................................... 93
Add References to Advanced Search........................................................................ 93
Add Right Column Define........................................................................................ 94
Add Calendar To Advanced Search.......................................................................... 94
Add the Search Form To Other Pages ...................................................................... 96
Add Text to the Model Number................................................................................ 97
Add Visitors IP ......................................................................................................... 97
Add Width to Product Listings Column ................................................................... 98
Change "click to enlarge" Text as a Graphic ............................................................ 99
Change The Number Of New Product Colums ...................................................... 100
Change Product Model Length ............................................................................... 100
Disable Payment Modules For Orders Over Certain Amount ................................ 101
Display Category Name.......................................................................................... 101
Move Country to Top of DropBox ......................................................................... 104
Move the Tell-A-Friend Form ................................................................................ 104
Password Text Characters....................................................................................... 105
Remove Category Arrows....................................................................................... 105
Remove What's New Box ....................................................................................... 106
Reset The Order ID Value ...................................................................................... 106
Search Engine Optimization ................................................................................... 107
SSL Hiding Infoboxes............................................................................................. 110
Upload Images to Their Own Folder in the Admin ................................................ 110
Use .htaccess File.................................................................................................... 111
Weight as Whole Number....................................................................................... 114
Page 4 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Introduction
This documentation is a starting point for those new to osCommerce, PHP, and MySQL.
The documentation will help you install osCommerce and implement some basic
customizations of your store. These documents are for version 2.2 Milestone 2 Update
051112.
This is not an exhaustive study of osCommerce but a basic introductory help guide. The
installation, catalog changes, and administration tool changes were written from people
helping people. We have also included some errors, fixes, and general information about
sessions. All of this information was compiled from the osCommerce community support
forum and put together into an organized and easy to read format to help with the basic
questions.
Our sincere and grateful thanks to all those on the forum who have helped others with
their expertise in answering questions.
Have a wonderful beginning!
Page 5 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Installation
osCommerce's feature packed out-of-the-box installation allows store owners to setup,
run, and maintain their online stores with minimum effort and with no costs involved.
osCommerce combines open source solutions to provide a free and open development
platform, which includes the powerful PHP web scripting language, the stable Apache
web server, and the fast MySQL database server.
With no restrictions or special requirements, osCommerce can be installed on any PHP3
or PHP4 enabled web server, on any environment that PHP and MySQL supports, which
includes Linux, Solaris, BSD, and Microsoft Windows environments.
New Installation
Upload the catalog directory to your server using FTP.
All PHP files must be uploaded in ASCII mode, not binary mode.
The structure of osCommerce is:
catalog
catalog/admin
extras
Upload the catalog folder which includes the admin folder to your document root
(public_html, www, htdocs) using FTP.
Using phpMyAdmin or another tool, create your database and user, and assign that user
to the database. Write down the name of the database, username, and password for this
database for the database installation procedure.
Open your web browser and go to http://yourserver/catalog/install/ and click on the
Install button.
The following instructions will guide you to configuring the online store for your server.
Step 1
Please customize your new installation with the following options:
Page 6 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Import Catalog Database - Install the database and add the sample data - leave this box
checked
Checking this box will import the database structure, required data, and some sample
data. (required for first time installations)
Automatic Configuration - Save configuration values - leave this box checked
Checking this box will save all entered data during the installation procedure to the
appropriate configuration files on the server.
Click the "Continue" button.
Step 2
Please enter the database server information:
Database Server – localhost
The database server can be in the form of a hostname, such as db1.myserver.com, or as
an IP-address, such as 192.168.0.1.
Username – username
The username used to connect to the database server. An example username is
'mysql_10'.
Note: Create and Drop permissions are required at this point of the installation
procedure. This first user should have CREATE privileges on the database
Password – password
The password is used together with the username, which forms the database user account.
Database Name – database name
The database used to hold the data. An example database name is 'osCommerce'.
Persistent Connections:
Enable persistent database connections.
Note: Persistent connections should be disabled for shared servers.
Session Storage:
Files
Database (choose Database)
Page 7 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Store user session data as files on the server, or in the database.
Note: Due to security related issues, database session storage is recommended for
shared servers.
Click the "Continue" button.
Step 3
Database Import
A test connection made to the database was successful.
Please continue the installation process to execute the database import procedure.
It is important this procedure is not interrupted, otherwise the database may end up
corrupt.
The file to import must be located and named at:
/home/username/public_html/catalog/install/oscommerce.sql
Click the "Continue" button.
Database Import
The database import was successful!
Click the "Continue" button.
Step 4
Please enter the web server information:
WWW Address - http://www.your-server.com/catalog/
The full website address to the online store
Webserver Root Directory - /home/username/public_html/catalog/
The server path to the online store
HTTP Cookie Domain - .your-server.com
The domain to store cookies in
HTTP Cookie Path - /catalog/
Page 8 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
The path to store cookies under
Enable SSL Connections - if you have ssl enable this
Enable secure SSL/HTTPS connections (requires a secure certificate installed on the web
server)
Click the "Continue" button.
Step 5
Note: This second user only needs SELECT, UPDATE and INSERT privileges if
you are using a second user. Most of times, both mysql users will be the same, but it
leaves the door open for added security if wanted.
Database Server - localhost
The database server can be in the form of a hostname, such as db1.myserver.com, or as
an IP address, such as 192.168.0.1
Username – username
The username is used to connect to the database server. An example username is
mysql_10.
Note: If the catalog is to be imported (selected above), the account used to connect to
the database server needs to have Create and Drop permissions.
Password – password
The password is used together with the username, which forms the database user account
Database Name – database name
The database used to hold the catalog data. An example database name is catalog
Persistent Connections:
Enable persistent database connections.
Note: Persistent connections should be disabled for shared servers.
Session Storage:
Files
Database (choose Database)
Page 9 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Store user session data as files on the server, or in the database.
Note: Due to security related issues, database session storage is recommended for
shared servers.
Click the "Continue" button.
You are nearly finished!
Rename the catalog/install folder or delete it.
Reset the permissions on /catalog/includes/configure.php to 644 (if you are still getting
the warning message at the top set configure.php to 444 which is read only - this happens
on some servers that have been updated for security reasons).
Set the permissions on /catalog/images directory to 777.
Reset the permissions on /catalog/admin/includes/configure.php to 644.
Create the dir /catalog/admin/backups and set the permissions to 777.
Set the permissions on /catalog/admin/images/graphs directory to 777.
You need to .htaccess your /catalog/admin directory so that it is password protected. You
can use the password manager in your server admin area like cpanel.
Congratulations! Now you are really done!
Page 10 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Installation Troubleshooting
Stylesheet: All images are broken
If a page shows everything right except the graphics and formatting are missing then go
to that page and change the link of your stylesheet in whatever file is not displaying
correctly:
rel=stylesheet>
All you have to do is find that line in and correct the path to point to your actual
stylesheet.css.
Page 11 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Administration Guide
This is the beginning of how to understand the osCommerce administration. This will be
a work in progress.
After you have logged into your store admin you will see a box of heading links on the
left for each section that needs to be modified. The information for each link is listed in
the center to the right.
We will go through each link in each section. The section headings are the pages of the
admin help documents and each page under the section heading is the linked page with
the information for that link only.
Page 12 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Configuration
The Configuration section will setup all the basic store configuration.
Click on "Configuration" and a drop down of text links will appear.
Click on one of the drop downs and to the right you will see the listings. To edit any of
these listings click in the space of each listing and when that listing is highlighted, click
on the "edit" button on the right.
My Store
Store Name
Name of your store
Store Owner
Can be your name or the name of your store. This will show up in the email in the "from"
when the customer receives their purchase email.
E-Mail Address
The "from" email address in the customer's purchase email.
E-Mail From
Your store general email.
Country
Country you are from.
Zone
The state or zone your store is located in. This is necessary to setup for taxes later on.
Expected Sort Order
The sort order used in the expected products box.
Expected Sort Field
The column to sort by in the expected products box
Switch To Default Language Currency
If you have several currencies it will automatically switch currencies when the language
is changed.
Page 13 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Send Extra Order Emails To
Your email address where you will receive orders.
Use Search-Engine Safe URLs
Display Cart After Adding Product
If set to "true" will show the shopping cart page when a product is put in the cart and then
the customer has to click on "continue" to go back to their product page to continue
shopping. They will also see their items in the shopping cart box.
If this is set to "false" then the customer will stay on the same page of the item they are
putting in the cart and will be able to see their items in the shopping cart box on the top
right column (if you move this, then wherever this box is).
Allow Guest To Tell A Friend
Lets the customer, when shopping, tell a friend about your site through the tell-a-friend
box.
Default Search Operator
Gives you "and' or "or" to use to search with.
Store Address and Phone
The name of your store, phone, and other information that will be seen if the customer is
using check/money order to checkout with.
Show Category Counts
Set to "true" to show the counts of products in each category.
Set to "false" if you do not want to show the number of products in each category.
Tax Decimal Places
Pads the tax value with decimal places.
Display Prices with Tax
Set to "false" and prices will not display with tax.
Set to "true" and prices will display with tax.
Minimum Values
These are the minimum values of any field filled out by the customer. Usually these are
left as is.
Maximum Values
Page 14 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
These are the maximum values of fields of different modules in your store.
Most of these are self-explanatory. These are just a couple that sometimes confuse
people.
Page Links is how many page numbers you see at the bottom of your product listing.
The "Search Results" listing is how many products will be listed in your store on one
page.
Images
These are the settings for all your images in the store. You can edit them to whatever you
need.
The "Small Image Width & Height" are the image sizes of your products in the product
listing page.
The "Heading Image Width & Height" are the image sizes that are uploaded for each
category.
The "Subcategory Image Width & Height" are all the sub-category image sizes.
Customer Details
These are the values that a customer fills out when they register at your store.
Enable or Disable these as you see fit.
Shipping/Packaging
Country Of Origin - set your country
Postal Code - set your postal code
Enter the Max Package Weight - Put your maximum weight here (this will be used if you
choose "ship by weight" in the Modules/Shipping Table Rate line.
Product Listing
Page 15 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
This displays the order of your products listed in your store. Change the values for
whatever product order you want.
Location of Prev/Next Navigation Bar sets the locatin of the Prev?Next Navigation Bar,
either top, bottom, or both.
Stock
This is an inventory control.
Set Stock level, Subtract Stock to true and osc will check your stock and substract stock
from items purchased.
Allow checkout allows customer to checkout even though your stock level is too low.
Mark product out of stock is a symbol you can use to mark a product that is out of stock.
Stock Re-order level is the set level that your stock gets down to before re-ordering.
Cache
Whenever your cache directory is not setup for your store you will get a pink error
message at the top of the store screen like this:
Error: Cache directory does not exist. Please set this Configuration->Cache.
In the admin under Tools/Cache Control the listings are as follows:
Categories Box File does not exist
Manufacturers Box File does not exist
Also Purchased Module File does not exist
Cache Directory: /tmp/
Through an FTP program, create a subfolder named "cache" in the "catalog" folder and
set the chmod permissions to 777. Then go to Configuration/Cache. Click on "Use
Cache" and set to "true". Click on Cache Directory
and set the absolute directory path to the "cache" folder.
If there is any question or problem establishing the absolute path, it may be because of
server redirects. Go to Tools/Database Backup and see what path is listed by the Admin
Page 16 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
for the database 'backups' folder. Use that path and append 'catalog/cache/' to the end of it
so that your path might appear as:
/home/username/www/catalog/cache/
Pay close attention to case sensitivity so that the directory path exactly matches the
"cache" folder created in FTP. Go back to Tools/Cache Control, refresh if necessary, and
the error message should be gone.
If the "file does not exist" messages still exist, upload via FTP, three blank files into your
cache directory called:
categories_box-english.cache
manufacturers_box-english.cache
also_purchased-english.cache
If there are more languages, create more files replacing engish with language name and
upload.
Now, go back to Tools/Cache Control, refresh if necessary, and the files should be
established, listing the date and time they were created.
Email Options
To be done.
Download
You need to enable this if you are going to allow people to download products at
checkout from your store.
First, put the product to be downloaded in the download folder on the Internet:
catalog/download
It will be read from the "pub" folder.
Make sure /catalog/pub is 777 and /catalog/download is 755 and these files in
catalog/includes/configure.php have the forward slash:
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
Page 17 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Under configuration in the admin set up the download info, true, true, expiry date, max
number of downloads.
Add the product in the admin under "catalog", "categories/products.
After you have added the product go to "Product Attributes" under the "Catalog" heading
in admin.
Choose the product in the bottom "Product Attributes" box.
When you choose a product and have download enabled in the configuration section you
will see a box below the "Product Attributes" section where you can add the product as a
download.
GZIP
This helps in your download of your store. Normal setting is 5 but if you have a lot of
traffic set to 9.
Sessions
You can set your configure.php file to store sessions in the database or you can set a
"sessions directory" if you are storing files in files.
Customers on AOL cannot use your store with these all set to "True". The only two that
can be set to "True" for aol users are "Force Cookie Use" and "Prevent Spider Sessions".
Page 18 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Catalog
The Catalog section will input all your products and category folders including setting up
your products as an expected date, setup product attributes, manufacturers, check your
reviews, & put products on special.
Categories/Products
Categories/Products
Clicking on the "new category" button in the center section will make a new folder.
Clicking on the "new product" button will make a new product.
When you are making a new product you have the ability to:
show the product in or out of stock
set the date the product will be availabe which corresponds with the "Products Expected"
module
set the product's manufacturer
set the product's name and description
set the product's quantity in stock (this corresponds with the "Configuration" "Stock"
section, product's model number
upload the products's image
set a product's url if you need to link out to another site
set the product's price
set the tax class which is used to charge tax on each product (this class must be setup first
in the tax section)
set products weight which, if you are using "weight" for your shipping schedule, each
product will need to have a weight listed
Top
After you have made a new folder or product it will show up on this main screen which is
called **"Top"** which is the name in the drop-down box at the upper right. This drop-
down box will eventually list all the folders and products in your store.
Move a Category Folder
To move a category folder, click to highlight that folder and choose the **"move"**
button on the right. You can move folders to other folders or to the **"Top"** directory.
Page 19 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Move a New Product
To move a new product, click to highlight the product you want to move and click the
**"move"** button on the right. When you click the **"move"** button you will see this
message:
"Move (name of product) to:".
Choose a place to move it and click the **"move"** button.
Copy a New Product
To copy a new product, click to highlight the product you want to copy and click the
**"copy to"** button on the right. When you click the **"copy to"** button you will see
this message:
Copy Method:
-Link product
-Duplicate product
Choose "Link product" if you just want to link it and "Duplicate product" if you want to
add another product.
Product Attributes
This section deals with the attributes of your products. For example, you sell shirts of
different sizes and different colors.
First, you would seup the "Option Name" (under "Product Options" at the top left). Using
shirts as an example you would have at least 2 "Option Names", color and size.
Next, you will setup your "Option Values" (under "Option Values" at the top right).
In this section you will see a box that shows the "Option Names" that you have already
setup. You have color setup as an "Option Name" so make sure color is in this box. Then,
to the right of that box is a blank box where you type in one of your colors. Do this for
each color and then do this again for each size. Make sure you associate and "Option
Value" (red, white, blue) with an "Option Name" (color, size, etc.).
Now, you are ready to start adding options to your products.
Under the "Products Attributes" section at the bottom you will see a drop down box
listing all of your products that you have already put into your store. Choose one and
follow across the drop downs to the right. The next box is the "Option Names", then the
"Option Values", and then the price box. If the price stays the same on each attribute then
leave this box blank. If the price goes up or down on each attribute then put an amount
from the "base price" and put a "plus" or "minus" sign in the next box.
For Example:
Page 20 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
size = medium = 10.00 (this is the regular price so no need to put a price in the "price
box".
size = small = 8.00 (put 2.00 - (this is $2 with a "minus" sign from the base price of
$10.00)
size = large = 12.00 (put 2.00 + (this is $2 with a "plus" sign from the base price of
$10.00)
Manufacturers
Add a manufacturer with their own image by clicking the "insert" button link. A
Manufacturers' URL can also be listing to direct link to the manufacturer.
Reviews
A listing of reviews that customers have put in is in this section. These reviews can be
edited or deleted by the store administrator.
Specials
Products can be listed as a special discount by a percentage or by an amount.
Click the "new product" graphic.
On the next screen choose your product from the drop-down box, put a special price. This
can be a percentage (10%) off or it can be a reduced set dollar amount like 10.00, and the
expiration date if any.
You can enter a percentage to deduct in the Specials Price field, for example: 20%
If you enter a new price, the decimal separator must be a '.' (decimal-point), example:
49.99
Leave the expiry date empty for no expiration
Products Expected
This is the list of products that will be expected to be in your store on a certain date. This
is setup when you input a product into the "Categories/Products" section.
Page 21 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Modules
The modules section is where you will setup your payment, shipping, and order total
ordering.
Payment
You will see several different payment modules. To turn one on click the "green dot" to
the right of the name. The "red dot" turns them off. You will have to enable one before
you can edit it.
After one is enabled by clicking the "green dot" that line will be highlighted. To edit,
click the edit button to the right of the highlighted line and edit.
Shipping
In shipping you have several different ways to charge shipping. To turn one on click the
"green dot" to the right of the name. The "red dot" turns them off. You will have to
enable one before you can edit it.
After one is enabled by clicking the "green dot" that line will be highlighted. To edit,
click the edit button to the right of the highlighted line and edit.
Order Total
The "Order Total" module puts the items in the order they will appear in the checkout
process. If you have inadvertantly put the same "sort order" on 2 items only one will
show up.
Page 22 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Customers
Customers
This is a list of all your customers that you can edit all but the password field and/or
delete customers. The password field does not show up.
Each individual customer can be emailed from this section.
Orders
These are your "pending" orders. Click the "edit" button to see the order and you can
change the status of the order, put comments in the comments box, and notify the
customer of the progress of their order.
You also have an invoice and packing slip capability. You can change the
oscommerce.gif graphic on the invoice and packing slip by changing it in
admin/images/oscommerce.gif to show your store image.
Page 23 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Taxes
This section sets up your taxes and zone for your store.
Countries
A listing of all countries in your store.
Zones
A listing of all zones in your store.
Tax Zones
The state and tax description of your store.
Tax Classes
The title of your tax class title like "taxable goods" and the description of that title.
Tax Rates
The tax rate of the state your store is in.
How to Setup Your Taxes
In admin, under Locations/Taxes, click on "Tax Zones"
Click on the "new zone" button. In the Zone Name: input field I enter "CA"
For Description I enter "California". Click on "insert"
After you click insert, you will see CA show up in the list. You think you're done, but not
quite!
Click on the "CA" (or whatever name you have!) in the list and you will see the heading
say "Geographical Zones / CA"
Here you see a "new zone" button again. Click on it!
Now you get to select a geographical zone. From Country, I Select United States
From Region, Select California. Click "update"
A few more steps to go! Now under "Locations/Taxes" click on "Tax Rates"
Click on "new tax rate" button
Select "Taxable Goods" from the Tax Class Title drop down menu
From the Zone menu, select CA (or whatever zone you created)
In the Tax Rate field enter the tax percentage
In the Description, enter the description, e.g. "California Sales Tax"
Now you're done!
Page 24 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Localization
This sets up your default currency, language, and order status to notify your customers.
The Orders Status can added to or the name changed by clicking the "edit" button after
that line has been clicked and is highlighted.
Page 25 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Reports
This section shows how many products have been viewed, purchased, and the total of
customers orders.
Page 26 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Admin : Tools
The Tools section is used to backup your database, manage a banner, file manager, send
your customers an email, send your customers a newsletter, give you your server
information, and see who's online.
Banner Manager
The banner manager allows you to put a banner at the bottom of your pages and to have
banner stats.
When the banner is turned on you will have the stats.
Database Backup
Click on the "backup" button.
Choose GZIP, ZIP, or pure sql.
Click "Download only" to download to your harddrive. A box will pop up for you to pick
the folder to put it in.
If you do not choose backup only then the backup manager will back it up to the backups
folder you have setup under the admin folder. The permissions on this backups folder
must be 777 to allow backups to be stored here. The backups folder will be secured by
the admin login as long as it is under the admin folder and the admin is password
protected by your server.
Send Email
You can send an email to one customer, to all customers, or to all newsletter subscribers.
Select the customer or customers in the drop down box.
Type a subject for your email.
Type a message for your email.
Click "send mail" button.
The next screen comes up showing your message and allows you to make changes before
really submitting. If all is good click the "send mail" button and your email will be sent.
Newsletter Manager
Page 27 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Click on "new newsletter" to make a new newsletter.
Choose Newsletter in the drop down box to send a regular newsletter.
Choose product_notification in the drop down box to notify customers of products.
Choose a title and type your message in the content box.
Click save.
This will take you back to the original page with your newsletter listed.
Click the "lock" button on the right.
Now, you can edit, delete, preview, send, or unlock your new newsletter.
For the product_notification newsletter click send.
On the next page choose the products on the left and transfer them to the right box.
Click submit.
Any customer who has asked to be notified on all products or certain products will be
sent an email.
Server Info
Information about your server you are hosting on. This is useful if you need to know
exactly what programs are on your server.
Who's Online
A traffic reporting tool useful to see who is accessing your site. If a customer is logged
into your store and looking around you can click on their link and see what page they are
on and what products they are looking at.
Page 28 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Catalog
The catalog section is divided into categories and sub-categories to make it easier to find
different areas.
Page 29 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Catalog : Boxes
Add/Remove Boxes
New boxes can be easily added to the left or right side column by editing the appropriate
includes/column_left.php or includes/column_right.php file.
Add Boxes
New boxes should be based on already existing boxes to make sure the formatting of the
page does not get broken.
It is important to make sure that new boxes are wrapped within
tags:
##BOX CONTENT HERE##
For this example, the new box will be based on the Information box:
$info_box_contents = array();
$info_box_contents [] = array('text' => BOX_HEADING_INFORMATION );
new infoBoxHeading ($info_box_contents , false, false);
$info_box_contents = array();
$info_box_contents [] = array('text' => '' .
BOX_INFORMATION_SHIPPING . '
' .
'' .
BOX_INFORMATION_PRIVACY . '
' .
'' .
BOX_INFORMATION_CONDITIONS . '
' .
'' .
BOX_INFORMATION_CONTACT . '
' .
'' .
BOX_INFORMATION_SITEMAP . '');
new infoBox ($info_box_contents );
?>
Page 30 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
The includes/boxes/information.php file above will be copied to
includes/boxes/my_new_box.php and will contain the following with MY_NEW_BOX
text changing to the name of your box file and PAGE listings renamed to the new pages
that will go in this new box:
$info_box_contents = array();
$info_box_contents [] = array('text' => BOX_HEADING_MY_NEW_BOX );
new infoBoxHeading ($info_box_contents , false, false);
$info_box_contents = array();
$info_box_contents [] = array('text' => '' .
BOX_MY_NEW_BOX_PAGE1 . '
' .
'' .
BOX_MY_NEW_BOX_PAGE2 . '
' .
'' .
BOX_MY_NEW_BOX_PAGE3 . '
' .
'' .
BOX_MY_NEW_BOX_PAGE4 . '
' .
'' .
BOX_MY_NEW_BOX_PAGE5 . '');
new infoBox ($info_box_contents );
?>
The new box must then be included from either the includes/column_left.php or
includes/column_right.php left or right side column file.
For this example, the new box will be included before the Information box on the left
side column in includes/column_left.php :
require( DIR_WS_BOXES . 'categories.php');
require(DIR_WS_BOXES . 'manufacturers.php' );
require(DIR_WS_BOXES . 'whats_new.php' );
require(DIR_WS_BOXES . 'search.php' );
require(DIR_WS_BOXES . 'my_new_box.php' );
require(DIR_WS_BOXES . 'information.php' );
?>
Next the new title and pages that go in the newly made box must be changed.
Page 31 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
In catalog/includes/languages/english.php find this code:
// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Terms & Conditions');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');
define('BOX_INFORMATION_SITEMAP', 'Sitemap');
Copy this information for the Information Box and paste below the Information Box
listing in the catalog/includes/languages/english.php file like this changing the Heading
Title for the new box plus adding additional pages to the new box:
// my new box text in includes/boxes/my_new_box.php
define('BOX_HEADING_MY_NEW_BOX', 'My New Box');
define('BOX_MY_NEW_BOX_PAGE1', 'Page1');
define('BOX_MY_NEW_BOX_PAGE2', 'New Page2');
define('BOX_MY_NEW_BOX_PAGE3', 'New Page3');
define('BOX_MY_NEW_BOX_PAGE4', 'New Page4');
define('BOX_MY_NEW_BOX_PAGE5', 'New Page5');
Please refer to Add Box Pages for adding these additional pages in the new box.
Remove Boxes
Boxes can be removed from the left or right hand column by editing the appropriate
includes/column_left.php or includes/column_right.php files.
Example includes/column_left.php file:
To remove the What's New box, it's inclusion needs to be commented out or removed
entirely:
require( DIR_WS_BOXES . 'categories.php');
require(DIR_WS_BOXES . 'manufacturers.php' );
require(DIR_WS_BOXES . 'whats_new.php' );
require(DIR_WS_BOXES . 'search.php' );
//require(DIR_WS_BOXES . 'my_new_box.php');
require( DIR_WS_BOXES . 'information.php');
?>
Add Images to Box Headings
Images can be added to each box displayed in the left and right side columns, where the
same image is used for all boxes or where different images are used for different boxes.
Page 32 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Solutions
Heading Text Replacement
Use Of Cascading Style Sheets
Heading Text Replacement
The simple method of having images in the box heading is to replace the heading text
value with an image.
This can be done by editing the main language file in the includes/languages/ directory,
for example includes/languages/english.php.
To replace the Categories box heading with an image, the heading title definition of
BOX_HEADING_CATEGORIES will need to be changed from:
define('BOX_HEADING_CATEGORIES', 'Categories');
To:
define('BOX_HEADING_CATEGORIES', '');
Use Of Cascading Style Sheets
The advanced method of having images in the box heading is to create CSS definitions
for each box where an image is to be shown.
The following example concentrates on the Categories box and needs the following three
files to be modified:
includes/classes/boxes.php
includes/boxes/categories.php
stylesheet.css
The following code should be added to includes/classes/boxes.php at the very bottom of
the page right before the ending ?> tag:
class infoBoxHeadingCategories extends tableBox {
function infoBoxHeadingCategories($contents) {
$this->table_cellpadding = '0';
$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'width="100%" class="infoBoxHeadingCategories"',
'text' => $contents[0]['text']));
$this->tableBox($info_box_contents, true);
}
}
Page 33 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
The code above creates a new class called infoBoxHeadingCategories which will be used
in the Categories box.
The following code in includes/boxes/categories.php:
new infoBoxHeading($info_box_contents, true, false);
should be replaced with:
new infoBoxHeadingCategories($info_box_contents, true, false);
As the new infoBoxHeadingCategories class uses a new stylesheet definition just for the
Categories box, the following needs to be added to the stylesheet.css file:
TD.infoBoxHeadingCategories {
background: #33c3d3;
background-image: url('images/some_graphic.gif');
background-repeat: no-repeat;
}
This new class in the stylesheet can have the font, size, spacing, etc. set according to css
styles.
Add Box Pages
Adding an additional box link page gives the store owner more flexibility for new pages
in their store under the different named boxes.
Add Box Pages
Adding a page or pages to one of the default boxes or a new box that you have made
allows you to add more information easily to your site. Our example box will be the
includes/boxes/information.php box.
Five files are necessary to change to add more pages to your box. These files can be
altered for an already displayed box or a new box.
Files to change are:
catalog/shipping.php
catalog/includes/filenames.php
catalog/includes/languages/english.php
catalog/includes/languages/english/shipping.php
catalog/includes/boxes/information.php
Page 34 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
Open the catalog/shipping.php page in your favorite editor and save it as another name,
for instance, about_us.php.
In the new about_us.php file that you have just made change the following require and
$breadcrumb filenames to the ABOUT_US name of your new file.
/*
$Id: about_us.php,v 1.21 2003/02/13 04:23:23 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
require( 'includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ABOUT_US );
$breadcrumb ->add(NAVBAR_TITLE, tep_href_link( FILENAME_ABOUT_US ));
Now it is time to define this new page called about_us.php so in
catalog/includes/filenames.php copy one of the defines, paste it underneath or at the
bottom of the file, and change the name to your new about_us.php file like this:
define('FILENAME_ABOUT_US', 'about_us.php');
The catalog/includes/languages/english.php file needs to have a listing of this file in
whichever box it will be called from in your store. It is defined in the information box for
an example.
// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');
define('BOX_INFORMATION_ABOUT_US', 'About Us');
Open the shipping.php page in catalog/includes/languages/english/ folder and other
languages folders and save as about_us.php like you did with the catalog/shipping.php
page above.
/*
$Id: about_us.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2002 osCommerce
Released under the GNU General Public License
*/
define('NAVBAR_TITLE', 'About Us');
define('HEADING_TITLE', 'About Us');
Page 35 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
define('TEXT_INFORMATION', 'YOUR ABOUT US TEXT GOES HERE' );
?>
The define for about_us.php will need to be added to the information.php page in
catalog/includes/boxes/information.php or to any new box file you have made.
'' .
BOX_INFORMATION_SHIPPING . '
' .
'' .
BOX_INFORMATION_PRIVACY . '
' .
'' .
BOX_INFORMATION_CONDITIONS . '
' .
'' .
BOX_INFORMATION_CONTACT . '
' .
'' .
BOX_INFORMATION_ABOUT_US . ''
);
You can change the order of any of these listings in the information.php file but be
careful that the last listing has the closing tag ''); and the listings above the last one
end with '
' .
Change Box Column Widths
/includes/application_top.php about line 58
// customization for the design layout
define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)
This changes both the right and left columns.
To keep the left column boxes 125 wide as above or whatever setting you want and
change the right column boxes or graphic or whatever you have in the right column do
this.
Make a new define in includes/application_top.php about line 58 called under the
BOX_WIDTH setting called BOX_WIDTH_RIGHT:
// customization for the design layout
define('BOX_WIDTH', 160); // how wide the boxes should be in pixels (default: 125)
define('BOX_WIDTH_RIGHT', 120); // how wide the right column should be in pixels
Change this code in each page in the catalog folder about line 334 for the right column
only.
From:
Page 36 of 114
Copyright © 2005 osCommerce. All rights reserved.
http://www.oscommerce.com
|